package com.ftg.learn.chapter10.work02;

/**
 * 测试商品生成
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/2/1 上午10:43
 */
public class Play {

    public static void main(String[] args) {
        CreateProduct cp1 = new CreateProduct() {
            @Override
            public Product create() {
                return new Product();
            }
        };

        CreateProduct<Product> cp2 = ()->new Product();
        Product p = cp2.create();
        System.out.println(p);
    }

}
